"""empty message

Revision ID: ee744705a1f4
Revises: 
Create Date: 2022-09-25 14:07:51.913102

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'ee744705a1f4'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('web-user',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('username', sa.String(length=64), nullable=True),
    sa.Column('email', sa.String(length=120), nullable=True),
    sa.Column('password_hash', sa.String(length=128), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_web-user_email'), 'web-user', ['email'], unique=True)
    op.create_index(op.f('ix_web-user_username'), 'web-user', ['username'], unique=True)
    op.create_table('flag',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('name', sa.String(length=64), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=True),
    sa.Column('created_at', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['user_id'], ['web-user.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_flag_name'), 'flag', ['name'], unique=True)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_flag_name'), table_name='flag')
    op.drop_table('flag')
    op.drop_index(op.f('ix_web-user_username'), table_name='web-user')
    op.drop_index(op.f('ix_web-user_email'), table_name='web-user')
    op.drop_table('web-user')
    # ### end Alembic commands ###
